#
# control Sun performance Lab machines
#

#? how to remove the password question from jewel servers?
#  Pengwei@sun.com 28875 85883875

#! on Desktop with Cygwin xterm
    bash
    # startup the slamd_server
    /space/software/slamd/slamd/bin/startup.sh
    # Startup 2 slamd monitor clients on jewel2
    rsh db2 "nohup /space/software/slamd_monitor_client/start_monitor_client.sh &"
    rsh jewel2 "nohup /space/slamd_monitor_client/start_monitor_client.sh &"

    # Startup 5 slamd clients
    for i in {7..12}; do rsh jewel$i "reboot"; done
    for i in {8..12}; do echo jewel$i; ping jewel$i &; done
    for i in {9..12}; do echo jewel$i; rsh jewel$i "nohup /space/slamd_client/start_client_manager.sh &"; done

    # on jewel3
    cd /space/software/slamd/slamd_monitor_client
    nohp ./start_monitor_client.sh &


#! on Desktop with Cygwin xterm
    $ grep jewel /etc/hosts
    192.18.47.155   jewel2
    192.18.47.156   jewel3

    ssh -L8081:10.60.11.31:8080 -l root jewel3      # referenced the 192.18.47.156
    ssh -L10127:10.60.11.26:10127 -l root jewel3    # 10.60.11.26 is the jewel2. the CDS server
    firefox http://localhost:8081/

    ssh -L2521:10.60.11.26:1521 -l root jewel3    # 10.60.11.26 is the jewel2. the CDS server

ssh -X root@10.8.1.200
    nohup /usr/dt/bin/dtterm -name jewel2 -display 10.8.1.213:0.0 &
    ssh jewel2
    # (sleep 3; echo jewel) | ssh -t -t jewel2
    # (sleep 3; echo root; sleep 2; echo jewel; sleep 2) | telnet jewel2
    bash

    nohup /usr/dt/bin/dtterm -name jewel3 -display 10.8.1.213:0.0 &
    ssh jewel3
    bash
    # ssh -L8081:10.60.11.31:8080 -l root jewel3
    # http://10.8.1.200:8081

    nohup /usr/dt/bin/dtterm -name jewel7 -display 10.8.1.213:0.0 &
    ssh jewel2
    rsh jewel7
    bash

    nohup /usr/dt/bin/dtterm -name jewel8 -display 10.8.1.213:0.0 &
    ssh jewel2
    rsh jewel8
    bash

    nohup /usr/dt/bin/dtterm -name jewel9 -display 10.8.1.213:0.0 &
    ssh jewel2
    rsh jewel9
    bash

    nohup /usr/dt/bin/dtterm -name jewel11 -display 10.8.1.213:0.0 &
    ssh jewel2
    rsh jewel11
    bash

# ssh -L81:10.60.11.26:80 -l root 192.18.47.156

[root@jewel2]/51Bench# cat /51Bench.sh
export CDS_HOME=/51Bench/Sun_Java_System_Content_Delivery_Server_5.1_ga
export PATH=$CDS_HOME/bin:$CDS_HOME/tools:$PATH

#
# all installed CDS on the jewel2
#
PORT=12380
/cds/cds_workspace/trunk/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh
PORT=12380
/cds/cds_workspace/trunk/modules/internal/perftest/src/scripts_old/cdsa_wrapper_scripts/env.sh
PORT=8080
/benchmark/blueDobPerf/Sun_Java_System_Content_Delivery_Server_5.1_ga/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh
PORT=8080
/benchmark/blueDobPerf/Sun_Java_System_Content_Delivery_Server_5.1_ga/tmpArch/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh
PORT=8080
/benchmark/nandu/Sun_Java_System_Content_Delivery_Server_5.1_ga/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh
PORT=8080
/benchmark/nandu2/Sun_Java_System_Content_Delivery_Server_5.1_ga/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh
PORT=12380
/benchmark/blueOnWebl/Sun_Java_System_Content_Delivery_Server_5.1_ga/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh
PORT=12380
/benchmark/blueOnWebl/Sun_Java_System_Content_Delivery_Server_5.1_ga/modules/internal/perftest/src/scripts_old/cdsa_wrapper_scripts/env.sh
PORT=7070
/tempIndia/cds_workspace/trunk/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh
PORT=6060
/tempIndia/cds_workspace/deployment/Sun_Java_System_Content_Delivery_Server_5.1_ga/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh
PORT=7070
/space/performance/deployment/Sun_Java_System_Content_Delivery_Server_5.1_ga/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh
PORT=7070
/space/performance/workspace/trunk/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh
PORT=7070
/TC/depl/cds51ga/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh
PORT=7070
/TC/workspace/trunk/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh
PORT=10127
/workspace/cds_workspace/trunk/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh
PORT=10123
/blueDog/Sun_Java_System_Content_Delivery_Server_5.1_ga/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh
# following is a runable envinronment
PORT=10127
/51Bench/Sun_Java_System_Content_Delivery_Server_5.1_ga/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh
PORT=7070
/tempChina/70/deployment/Sun_Java_System_Content_Delivery_Server_5.1_ga/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh
PORT=7070
/tempChina/70/workspace/trunk/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh
PORT=7070
/tempChina/workspace/trunk/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh

#
# SLAMD deployment
#

10.60.11.31     jewel7  # server /51Bench
10.60.11.32     jewel8  # client /space/slamd_client
10.60.11.33     jewel9  # client /space/slamd_client
10.60.11.34     jewel10 # client /space/slamd_client
10.60.11.35     jewel11 # client /space/slamd_client
10.60.11.36     jewel12 # client /space/slamd_client


# Toubleshooting on the jewel11
#
# problem 1: Unable to instantiate environment class "com.sun.content.server.perftest.slamd.DefaultEnv":  java.lang.reflect.InvocationTargetException
#            please reference slamdClient180.log for detail
#   anwser : changing Test scenario file. A wrong xml file may cause slamd client occur this error.
#

for i in *jar ; do echo $i; jar tvf  $i | grep "com\/sun\/content\/server\/perftest\/slamd\/" ; done > /tmp/output
commons-fileupload-1.0.jar
foundation.jar
iText.jar
jai_codec.jar
ldapjdk.jar
log4j-1.2.8.jar
perftest.jar
     0 Wed May 28 08:00:06 PDT 2008 com/sun/content/server/perftest/slamd/
  6472 Wed May 28 08:00:06 PDT 2008 com/sun/content/server/perftest/slamd/CdsEventHandler.class
 30066 Wed May 28 08:00:06 PDT 2008 com/sun/content/server/perftest/slamd/CdsSlamdJob.class
  2575 Wed May 28 08:00:06 PDT 2008 com/sun/content/server/perftest/slamd/DefaultEnv$CategoryInfo.class
  2229 Wed May 28 08:00:06 PDT 2008 com/sun/content/server/perftest/slamd/DefaultEnv$ContentInfo.class
  1057 Wed May 28 08:00:06 PDT 2008 com/sun/content/server/perftest/slamd/DefaultEnv$DeviceInfo.class
  1897 Wed May 28 08:00:06 PDT 2008 com/sun/content/server/perftest/slamd/DefaultEnv$ResourceInfo.class
  1392 Wed May 28 08:00:06 PDT 2008 com/sun/content/server/perftest/slamd/DefaultEnv$SubscriberInfo.class
  6284 Wed May 28 08:00:06 PDT 2008 com/sun/content/server/perftest/slamd/DefaultEnv.class
  3349 Wed May 28 08:00:06 PDT 2008 com/sun/content/server/perftest/slamd/DefaultSession.class
  5611 Wed May 28 08:00:06 PDT 2008 com/sun/content/server/perftest/slamd/RegExprVariable.class
   385 Wed May 28 08:00:06 PDT 2008 com/sun/content/server/perftest/slamd/SessionEventHandler.class
  5670 Wed May 28 08:00:06 PDT 2008 com/sun/content/server/perftest/slamd/SessionManager.class
  6147 Wed May 28 08:00:06 PDT 2008 com/sun/content/server/perftest/slamd/SessionVariable.class
   371 Wed May 28 08:00:06 PDT 2008 com/sun/content/server/perftest/slamd/TestEnv.class
  4687 Wed May 28 08:00:06 PDT 2008 com/sun/content/server/perftest/slamd/URLVariable.class
slamd_client.jar
slamd_resource.jar
